﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Giohang.aspx.cs" Inherits="Web.Giohang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 293px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="list-product">
<div class="header-listproduct">
<h3>Giỏ Hàng</h3>
</div>
<div class="content-listproduct">
    
</div>
   
    <asp:GridView ID="gvShoppingCart" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="ProductId" 
        EmptyDataText="Không có sản phẩm nào trong giỏ hàng của bạn" ForeColor="Black" 
        GridLines="Vertical" OnRowCommand="gvShoppingCart_RowCommand" 
        OnRowDataBound="gvShoppingCart_RowDataBound" ShowFooter="True" Width="100%">
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" 
            HorizontalAlign="Left" />
        <FooterStyle BackColor="#CCCCCC" BorderColor="Black" HorizontalAlign="Right" />
        <AlternatingRowStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Tên sản phẩm" />
            <asp:TemplateField HeaderText="Số lượng">
                <ItemTemplate>
                    <asp:TextBox ID="txtQuantity" runat="server" Columns="5" 
                        Text='<%# Eval("Quantity") %>'></asp:TextBox>
                    <br />
							<asp:LinkButton ID="btnRemove" runat="server" 
                        CommandArgument='<%# Eval("ProductId") %>' CommandName="Remove" 
                        style="font-size:12px;" Text="Xóa"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UnitPrice" HeaderText="Giá">
            <HeaderStyle HorizontalAlign="Right" />
            <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="TotalPrice" HeaderText="Thành tiền">
            <HeaderStyle HorizontalAlign="Right" />
            <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
        </Columns>
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <table class="style1">
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
    <asp:Button ID="btnUpdateCart" runat="server" OnClick="btnUpdateCart_Click" 
        Text="Cập nhật giỏ hàng" />
   
            </td>
            <td>
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                    Text="Thanh Toán" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <br />
   
</div>
</asp:Content>
